package util.web.ajax;

import java.io.Serializable;

import net.sf.json.JSON;
import net.sf.json.JSONSerializer;

public class AjaxStatus implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private int Status;
	private String Message;
	private String RedirectURL;

	public int getStatus() {
		return this.Status;
	}
	public void setStatus(int Status) {
		this.Status = Status;
	}

	public String getMessage() {
		return this.Message;
	}
	public void setMessage(String Message) {
		this.Message = Message;
	}

	public String getRedirectURL() {
		return this.RedirectURL;
	}
	public void setRedirectURL(String RedirectURL) {
		this.RedirectURL = RedirectURL;
	}
	
	public AjaxStatus() {
		Status = 0;
		Message = "";
		RedirectURL = "";
	}
	
	public JSON toJSON() {
		return JSONSerializer.toJSON(this);
	}
	
	public String toJsonString() {
		return this.toJSON().toString();
		//return (new JSONObject(this)).toString();
	}
}
